BLOB Normal Form: BLOB and Primary Key in Their Own Table

Mark Leighton Fisher on 2006-12-29T17:57:01

One technique to avoid the BLOB Tax (poor DB performance when BLOBs are present) is to separate BLOBs into their own table, with only their primary keys to keep them company. Databases that allow per-table storage areas should particularly benefit from this technique, as it isolates the BLOB tables from the rest of the database.

Offhand, I think this technique should be dubbed BLOB Normal Form, as this technique is similar to the relational database Xth Normal Form schema design techniques.

(I think I first saw this tip in the SQL Server Central newsletter.)


It's not normal form

autarch on 2006-12-29T22:45:17

The normal forms are all about _logical_ issues. What you're describing is purely an implementation detail of how some databases handle BLOBs, and the workaround you suggest has nothing to do with the logic of your data model.

In a better world, the DBMS engine would do this sort of thing transparently, or at least provide ways for DBAs to manually split the physical storage of tables across multiple locations.

Re:It's not normal form

Aristotle on 2006-12-30T06:35:10

In a better world, the DBMS engine would do this sort of thing transparently

Thumbs up.

Re:It's not normal form

pudge on 2007-01-04T22:49:26

True enough. Still, this is a Good Practice. We do this in Slash too: the actual text of stories, comments, journals, etc. are all in their own table, with only the primary key.